/*
    Steven Spungin <steven@spungin.tv>
    Use box sizing to cause (text input and area) to fit within parent div instead of using 99% width hack
*/

/* Layout helpers
----------------------------------*/
.xml_editor_container .ui-helper-hidden { display: none; }
.xml_editor_container .ui-helper-hidden-accessible { position: absolute; left: -99999999px; }
.xml_editor_container .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
.xml_editor_container .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
.xml_editor_container .ui-helper-clearfix { display: inline-block; }
.ui-helper-hidden-accessible { display: none; }
/* required comment for clearfix to work in Opera \*/
* html .ui-helper-clearfix { height:1%; }
.xml_editor_container .ui-helper-clearfix { display:block; }
/* end clearfix */
.xml_editor_container .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }

.xml_editor_container {
	position: relative;
}

.xml_dialog.ui-dialog {
	position: absolute;
	top: 0;
	left: 0;
	padding: .2em;
	outline: 0;
	border-radius : 6px;
	font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif;
	font-size: 14px;
}
.xml_dialog .ui-dialog-titlebar {
	padding: .4em 1em;
	position: relative;
}
.xml_dialog .ui-dialog-title {
	float: left;
	margin: .1em 0;
	white-space: nowrap;
	width: 90%;
	overflow: hidden;
	text-overflow: ellipsis;
}
.xml_dialog .ui-dialog-titlebar-close {
	position: absolute;
	top: 50%;
	margin: -10px 0 0 0;
	padding: 1px;
	height: 20px;
}
.xml_dialog .ui-dialog-content {
	position: relative;
	border: 0;
	padding: .5em 1em;
	background: none;
	overflow: auto;
	clear: both;
}
.xml_dialog .ui-dialog-buttonpane {
	text-align: left;
	border-width: 1px 0 0 0;
	background-image: none;
	margin-top: .5em;
	padding: .3em 1em .5em .4em;
}
.xml_dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
	float: right;
}
.xml_dialog .ui-dialog-buttonpane button {
	margin: .5em .4em .5em 0;
	cursor: pointer;
}
.xml_dialog .ui-icon {
	display: block;
	padding: .4em .3em;
}
.xml_dialog .ui-resizable-se {
	width: 12px;
	height: 12px;
	right: -5px;
	bottom: -5px;
	background-position: 16px 16px;
}

.ui-draggable .ui-dialog-titlebar {
	cursor: move;
}

.ui-widget-overlay {
	background-color: #777777;
	opacity: .3;
	filter: Alpha(Opacity=30);
	position: absolute;
	top: 0;
	left: 0;
}

.ui-widget-content {
	border: 1px solid #aaaaaa;
	background: #ffffff;
}

.xml_export_filename {
	width: 160px;
}

/****************/

.xml_text_node {
	/*border-radius: 5px;*/
	position: relative;
	padding: 0;
	width: 100%;
	border: 1px solid #cccfdd;
	background-color: #F0F8FF;
}

.xml_text_node.selected {
	background-color: #c4eff5;
}

.xml_text_node + .xml_text_node {
	border-top-width: 0;
}

.xml_text_node .xml_input_column {
	box-shadow: -2px 2px 2px #ddddee inset;
	border-right: 1px solid #ddd;
	width: calc(100% - 27px);
	padding: 0;
	margin: 0;
	overflow-x: hidden;
	background-color: #F0F8FF;
}

.xml_text_node .xml_input_column textarea, .xml_text_node .xml_input_column input {
	background: transparent;
	border: none;
	width: 100%;
	margin: 0;
	min-height: 3em;
	overflow-y: auto;
}

.xml_text_node .xml_input_column input {
	min-height: 1.5em;
}

.xml_text_node .xml_delete {
	position: absolute;
	right: 4px;
	top: 4px;
	background-color: #e4e4e4;
    border-radius: 2px;
    padding: 2px 5px;
	border: 1px solid #aaaabb;
	font-size: 11px;
	color: #4C4C4C;
	font-weight: 400;
	vertical-align: 50%;
	cursor: pointer;
}

.xml_text_node .xml_type_header {
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	padding: 5px;
	display: block;
	font-weight: bold;
	cursor: default;
}

.xml_text_node.xml_comment_node .xml_type_header {
	color : #B6B5BE;
}

.xml_input, .xml_select, .xml_textarea {
	max-width: 100%;
	display: block;
	font-size: 13px;
}

.xml_input {
	box-sizing: border-box;
	height: 25px;
}

.xml_select {
	height: 25px;
	min-width: 120px;
}

.xml_textarea, .textareaClone {
	max-height: 18em;
	box-sizing: border-box;
	resize: vertical;
	font-size: 13px;
	padding: 4px 0 0 5px;
}

.xml_textarea:focus, .xml_input:focus {
	border: 1px solid #09C;
}

/* Element */
.top_level_element_group {
	margin: 8px 0 20px 0px;
}

.xml_element {
	border: 1px solid #aaaabb;
	font-size: 14px;
	box-shadow: 4px 3px 3px 0 #CCE8F1;
	margin-bottom: 10px;
	background-color: #fff;
	-webkit-border-radius: 6px;
	-moz-border-radius: 6px;
	border-radius: 6px;
}

.xml_element.xml_root_element {
	margin-top: 10px;
	border: 1px solid #bbbbcc;
}

/*.xml_root_element > .content_block.xml_children {
	padding: 0;
}*/

.xml_children > .xml_element {
	margin-bottom: 20px;
}

.xml_children > .xml_element:last-child {
	margin-bottom: 0px;	
}

.top_level_element_group.xml_element {
	margin-left: 0px;
}

.element_header {
	padding: 4px 1px 1px 7px;
	line-height: 22px;
	height: 22px;
	-webkit-border-radius: 6px 6px 0px 0px;
	-moz-border-radius: 6px 6px 0px 0px;
	border-radius: 6px 6px 0px 0px;
	border-bottom: 1px solid #bbbbbb;
	margin-bottom: 12px;
}

.xml_element.collapsed .element_header {
	margin-bottom: 0;
	-webkit-border-radius: 6px 6px 6px 6px;
	-moz-border-radius: 6px 6px 6px 6px;
	border-radius: 6px 6px 6px 6px;
}

.xml_root_element > .element_header {
	background-color: #eeeeee;
	background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#eeeeee));
	background: -moz-linear-gradient(top,  #FFFFFF,  #eeeeee);
	background: linear-gradient(to bottom,  #FFFFFF,  #eeeeee);
}

.top_level_element_group > .element_header {
	background-color: #dddddd;
	background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#dddddd));
	background: -moz-linear-gradient(top,  #FFFFFF,  #dddddd);
	background: linear-gradient(to bottom,  #FFFFFF,  #dddddd);
}

.top_level_element_group > div > .xml_children > .xml_element > .element_header {
	background-color: #e9e9eb;
	background: -webkit-gradient(linear, left top, left bottom, from(#FAFFFF), to(#e9e9eb));
	background: -moz-linear-gradient(top,  #FAFFFF,  #e9e9eb);
	background: linear-gradient(to bottom,  #FAFFFF,  #e9e9eb);
}

.top_level_element_group > div > .xml_children > .xml_element > div > .xml_children > .xml_element > .element_header {
	background-color: #f1f1f3;
	background: -webkit-gradient(linear, left top, left bottom, from(#F5FFFF), to(#f1f1f3));
	background: -moz-linear-gradient(top,  #F5FFFF,  #f1f1f3);
	background: linear-gradient(to bottom,  #F5FFFF,  #f1f1f3);
}

.top_level_element_group > div > .xml_children > .xml_element > div > .xml_children > .xml_element > div > .xml_children > .xml_element > .element_header {
	background-color: #f5f5f9;
	background: -webkit-gradient(linear, left top, left bottom, from(#F0FFFF), to(#f5f5f9));
	background: -moz-linear-gradient(top,  #F0FFFF,  #f5f5f9);
	background: linear-gradient(to bottom,  #F0FFFF,  #f5f5f9);
}

.xml_element.selected {
	border: 1px solid #EB8F00;
	box-shadow: 0px 0px 6px 1px #FBD850;
}

.xml_root_element.selected {
	box-shadow: 3px 3px 6px 0 #F9E59A;
}

.xml_element.selected > .element_header {
	background-color: #A4CABB !important;
	background: -webkit-gradient(linear, left top, left bottom, from(#C4E9EE), color-stop(0.5, #5ECFE6), to(#76B6E1)) !important;
	background: -moz-linear-gradient(top,  #C4E9EE, #5ECFE6, #76B6E1) !important;
	background: linear-gradient(to bottom,  #C4E9EE,  #5ECFE6, #76B6E1) !important;
}

.xml_root_element > .element_header > .element_name {
	font-size: 16px;
	color: #666677;
}

.top_level_element_group.xml_element > .element_header > .element_name {
	font-size: 16px;
}

.element_header {
	font-weight: bold;
	color: #445;
}

.element_name {
	min-width: 100px;
	font-size: 14px;
	float: left;
}

.selected > .element_header > .element_name {
	color: #442222;
}

.element_header > .top_actions {
	text-align: right;
	margin-top: -2px;
}

.element_header > .top_actions > span {
	padding: 2px 5px;
	border: 1px solid #aaaabb;
	border-radius: 2px;
	font-size: 11px;
	margin: 0px 2px;
	background-color: #eee;
	color: #4C4C4C;
	font-weight: 400;
	vertical-align: 50%;
	cursor: pointer;
}

.element_header > .top_actions > span:hover {
	background-color: #ddf;
}

.placeholder {
	display: block;
	font-style: italic;
	color: #bbb;
	font-size: 13px;
	padding: 0px 10px 10px 10px;
}

.xml_content > .placeholder, .xml_element > .xml_children > .placeholder {
	display: none;
}

.xml_content > .placeholder:last-child, .xml_element > .xml_children > .placeholder:last-child  {
	display: block;
	font-style: italic;
	color: #bbb;
	font-size: 13px;
	padding: 5px;
}

.element_header .edit_title, .xml_attr_stub label {
	min-width: 160px;
	height: 1.3em;
	padding: 2px 7px;
	border: 1px solid #eee;
	background-color: #fff;
	display: inline-block;
}

.xml_stub.selected .element_header .edit_title {
	background-color: #D4F1F5;
	border-color: #5ECFE6;
	box-shadow: 2px 2px 2px #CBDBDF inset;
	
}

.xml_stub .element_header {
	margin-bottom: 0;
	padding-bottom: 5px;
	border-radius: 6px 6px 6px 6px;
}

.xml_stub .element_header .top_actions > span {
	vertical-align: middle;
}

.xml_stub .create_element {
	display: inline-block;
	margin-left: 10px;
	font-weight: 400;
	cursor: pointer;
	color: #667;
	vertical-align: top;
	text-decoration: underline;
}

.xml_autocomplete {
	overflow-x: hidden;
	max-height: 8em;
	box-shadow: 4px 4px 5px 0 rgba(0, 0, 0, 0.15);
}

.xml_autocomplete .ui-menu-item {
	padding: 2px 7px;
}

.xml_autocomplete .ui-menu-item span {
	font-weight: bold;
}

.xml_autocomplete .ui-state-focus {
	background-color: #eef;
}

.xml_attr_stub .create_attr {	
	text-decoration: underline;
}

/* Attributes */

.attribute_container {
	display: inline-block;
	*zoom: 1;
	*display: inline;
	margin-right: 20px;
	padding: 2px;
}

.attribute_container.selected {
	background-color: #DDDDFF;
	box-shadow: 0 0 6px 1px #DDDDFF;
	border-radius: 6px;
}

.attribute_container > label {
	font-weight: bold;
	line-height: 1.5em;
	margin-right: 5px;
	vertical-align: 28%;
	display: inline-block;
	*zoom: 1;
	*display: inline;
	min-width: 90px;
}

.attribute_container > textarea {
	display: inline;
	resize: horizontal;
	min-width: 100px;
	height: 1.5em;
	width: 160px;
	overflow: hidden;
}

.attribute_container > select {
	vertical-align: 45%;
	width: 166px;
	display: inline-block;
	*zoom: 1;
	*display: inline;
}

.attribute_container > a, .attribute_container .create_attr {
	color: #1C94C4;
	vertical-align: 45%;
	cursor: pointer;
}

.attribute_container > a:hover {
	color: #44468a;
}

.xml_element .content_block {
	padding: 0px 10px 12px 10px;
	/*border-top: 1px solid #bbb;*/
}

.content_block + .content_block {
	padding-top: 0px;
}

.xml_text_node + .xml_element {
	margin-top: 20px;
}

/* Menu */

.xml_menu_column {
	width: 170px;
	padding-left: 15px;
	height: 100%;
	z-index: 1000;
}

.xml_menu_container {
}

.xml_submit_status {
	display: block;
	margin: 5px 0px;
}

.send_xml {
	margin: 5px 0px 10px 0px;
}

.menu_content {
	background-color: #ffffff;
	background-image: -moz-linear-gradient(left, #dddddd, #ffffff);
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#dddddd', endColorstr='#ffffff', GradientType=1);
	background-image: -webkit-gradient(linear, left top, right top, from(#dddddd), to(#ffffff));
	background-image: -ms-linear-gradient(left, #dddddd, #ffffff);
	background: linear-gradient(to right,  #dddddd,  #ffffff);
	border-left: 1px solid #bbb;
	margin: 0;
	-webkit-user-select: none;
	-ms-user-select: none;
	-moz-user-select: -moz-none;
	user-select: none;
}

.menu_content li {
	padding: 3px 3px 2px 10px;
	background-color: #ffffff;
	cursor: pointer;
	margin: 0 0 1px 0;
	text-indent: 0;
}

.menu_content li:hover {
	background-color: #F0F8FF;
}

.menu_content li.disabled {
	background-color: #bbbbbb;
	color: #555555;
}

.menu_header {
	font-size: 14px;
	padding: 5px;
	background-repeat: repeat-x;
	background-position: left 0px;
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFF', endColorstr='#dddddd');
	background: -webkit-gradient(linear, left top, left bottom, from(#FFFFFF), to(#dddddd));
	background: -moz-linear-gradient(top,  #FFFFFF,  #dddddd);
	background: linear-gradient(to bottom,  #FFFFFF,  #dddddd);
	border: 1px solid #aaaabb;
}

.menu_header.disabled { 
	color: #999999;
	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#cccccc');
	background: -webkit-gradient(linear, left top, left bottom, from(#eeeeee), to(#cccccc));
	background: -moz-linear-gradient(top,  #eeeeee,  #cccccc);
	background: linear-gradient(to bottom,  #eeeeee,  #cccccc);
}

.menu_header span {
	color: #aaa;
	float: right;
}

/*.xml_content {
	padding: 5px 0px 5px 5px;
}*/

/* Head tabs */

.xml_work_area, .xml_tab_area {
	background-color: #fff;
	border: 0;
}

/* XML editor */
.xml_tab_area {
	background-color: #ffffff;	
}

.text_content {
	line-height: 16px;
	padding: 5px 18px 0 0;
}

.xml_tab_area .gui_content { 
	padding: 3px 0 0 0;
	background-color: #fafafa;
	min-height: 600px;
}

.highlighted {
	background-color: #ffff00;
	position: absolute;
	box-shadow: 0 0 2px 2px #eeeeee;
}

.xml_problems_panel {
	background-color: #ffeeee;
	padding: 5px;
	white-space: pre-wrap;
	margin: 5px 0px;
}

/* Menu bar */

.xml_editor_header {
	position: absolute;
	background-color: #ffffff;
	z-index: 1000;
	width: inherit;
	border-bottom: 1px solid #eeeeee;
	padding-right: 2px;
	padding-top: 4px;
}

.xml_editor_header > h2 {
	text-overflow: ellipsis;
	overflow: hidden;
	font-size: 18px;
	white-space: nowrap;
	margin-bottom: 10px;	
}

.xml_editor_header_backing {
	position: absolute;
	background-color: #ffffff;
	z-index: 999;
	width: 100%;
	background-color: #ffffff;
}

.xml_menu_bar {
	margin-bottom: 3px;
	overflow: auto;
	width: inherit;
}

.xml_menu_bar > ul {
	margin: 0;
}

.xml_menu_bar > ul > li {
	display: inline-block;
	*zoom: 1;
	*display: inline;
	font-size: 14px;
	margin: 0;
	text-indent: 0px;
}

.xml_menu_bar > ul > li > a > span {
	padding: 6px 8px;
	display: inline-block;
	font-size: 15px;
	cursor: pointer;
	-webkit-user-select: none;
	-ms-user-select: none;
	-moz-user-select: -moz-none;
	user-select: none;
	*zoom: 1;
	*display: inline;
}

.xml_menu_bar > ul > li > a > span:hover {
	background-color: #eeeeee;	
}

.xml_menu_bar > ul > li > ul {
	display: none;
}

.xml_menu_bar.active > ul > li:hover > a > span {
	padding: 5px 7px;
	border: 1px solid #bbbbcc;
	border-bottom: 0px;
	z-index: 1002; 
	background-color: #fff;
	position: relative;
}

.xml_menu_bar.active > ul > li:hover {
	box-shadow: 0 2px 4px #555555;
}

.xml_menu_bar > ul > li .over_shadow {
	padding: 5px;
	position: relative;
	background-color: #ffffff;
}

.xml_menu_bar.active > ul > li:hover > ul {
	margin-top: -1px;
	position: absolute;
	width: 280px;
	display: block;
	box-shadow: 0 2px 4px #555555;
	border: 1px solid #bbbbcc;
	z-index: 1001;
	background-color: #fff;
}

.xml_menu_bar.active > ul > li > ul > li {
	padding: 5px 7px;
	cursor: pointer;
}

.xml_menu_bar.active > ul > li > ul > .disabled {
	color: #B4B7BA;
	cursor: default;
}

.xml_menu_bar.active > ul > li > ul > li:hover {
	background-color: #eeeeee;	
}
 
.xml_menu_bar.active .binding {
	float: right;
	font-style: italic;
}

.xml_menu_bar.xml_bindings_disabled .binding {
	display: none;
}

.xml_menu_bar .header_mode_tab {
	border: 1px solid #BBBBBB;
	float: right;
	margin-left: 10px;
	margin-right: 0px;
	transition: border-color 0.2s linear 0s, box-shadow 0.2s linear 0s, color 0.2s linear 0s;
}

.xml_menu_bar .active_mode_tab {	
	border: 1px solid #FBD850;
	color: #EB8F00;
	box-shadow: 0 0 3px #E5E5E5 inset, 0 0 3px #FBD850;
}

.xml_menu_bar .sub_menu > li > .xml_menu_check {
	display: inline-block;
	*zoom: 1;
	*display: inline;
	width: 1em;
}

/* Default templating */
.template-form.jquery-editor-no-close .ui-dialog-titlebar-close {
  display: none;
}

.ui-dialog.template-form  {
	border-radius: 6px;
	font-size: 18px;
}

.template-form .ui-dialog-titlebar {
	background : transparent linear-gradient(to bottom, #FFF, #DDD) repeat scroll 0% 0%;
	padding: 8px 10px;
	border-radius: 6px 6px 0px 0px;
	border-bottom: 1px solid #BBB;
	margin-bottom: 6px;
	font-weight: bold;
	font-size: 1.2em;
	color: #445;
}

.template-form .ui-dialog-content {
	padding: 10px;
	border: none;
	overflow: auto;
}

.template-form .ui-dialog-buttonpane {
	text-align: right;
	padding: 6px;
	border: none;
	background: none;
	border-top: 1px solid #AAA;
}

.template-form .ui-button {
	padding: 8px 10px;
	border-radius: 6px;
	border: 1px solid #aaa;
	margin-left: 10px;
	background-color: #eee;
	font-size: 1em;
}

.templating {
	height: auto;
	border: 1px solid #d3d3d3;
	padding: 10px;
	margin-bottom: 10px;
	font-weight: bold;
	cursor: pointer;
	border-radius: 4px;
}

.templating a {
	text-decoration: none;
	font-weight: bold;
	pointer-events: none;
	color: #000;
	clear: both;
}

.templating a span {
	font-weight: normal;
	font-size: .8em;
	display: block;
	margin-top: 5px;
	line-height: 1.2em;
}

.templating div {
	min-height: 36px;
}

.template-form .focus {
	background-color: #eee;
	border-color: lightslategray;
}

body + .template-form {
	display: none;
}